package designPattern.factory工厂模式.simpleFactory;

public class CarFactory {
    public static Car getCar(String car) {
        if ("Tesla".equals(car)) {
            return new Tesla();
        } else if ("WuLing".equals(car)) {
            return new WuLing();
        } else {
            return null;
        }
    }

    public static Car getWuLing() {
        return new WuLing();
    }

    public static Car getTesla() {
        return new Tesla();
    }
}
